package com.atguigu.aiproject.mapper;

import com.atguigu.aiproject.entity.Img;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ImgMapper extends BaseMapper<Img> {

    @Select("select img_name from imgs where creation_id = #{creationId}")
    List<String> getImgByCreationId(Integer creationId);

    @Select("insert into imgs(img_name, creation_id) values(#{imgName}, #{creationId})")
    void save(Img img);
}
